package models

import (
	"time"
)

// YhProduct undefined
type Product struct {
	ID          int64     `json:"id" gorm:"id"`
	Name        string    `json:"name" gorm:"name"`
	CateId      int64     `json:"cate_id" gorm:"cate_id"`
	CateName    string    `json:"cate_name" gorm:"cate_name"`
	Image       string    `json:"image" gorm:"image"`
	SpecType    int8      `json:"spec_type" gorm:"spec_type"`
	Attr        string    `json:"attr" gorm:"attr"` // 属性
	Desc        string    `json:"desc" gorm:"desc"`
	Tip         string    `json:"tip" gorm:"tip"`
	Content     string    `json:"content" gorm:"content"`
	Price       float64   `json:"price" gorm:"price"`
	Status      int8      `json:"status" gorm:"status"`
	Store       int64     `json:"store" gorm:"store"`
	Sales       int64     `json:"sales" gorm:"sales"`
	IsRecommend int8      `json:"is_recommend" gorm:"is_recommend"` // 0:不推荐 1:推荐
	IsAble      int8      `json:"is_able" gorm:"is_able"`           // 1:有效  -1:无效
	CreatedAt   time.Time `json:"created_at" gorm:"created_at"`
	UpdatedAt   time.Time `json:"updated_at" gorm:"updated_at"`
	AreaId      int8      `json:"area_id" gorm:"area_id"` // 专区
}

// TableName 表名称
func (*Product) TableName() string {
	return "dg_product"
}